1. Field of Invention
The present invention relates to the field of computer graphics and image processing, and particularly to a method for acquiring graphic data of a display device in a computer by means of filter driver.
2. Description of Prior Art
The graphics and image processing capability of a personal computer (PC) is gradually strengthen with its enhanced computation performance and installed graphics processor and is extended from earlier 2D bitmap and vector application to 3D and video. Rich content brings a user more enjoyable experience, while applications for synchronously obtaining content to be displayed are required, especially the application for realizing a real-time acquisition of screen content, since great challenges are imposed by remote control, remote projection, multi-user sharing, static screen capture and the like.
There are both software and hardware implementations with respect to techniques for a real-time acquisition of screen content. The technique for acquiring screen content in a real-time manner by means of hardware is to intercept directly video output signal from a display adapter, input it into a video compression card as input source, and record it in the form of stream after the compression by the compression card. This hardware solution is simple since a hardware compression card is utilized to process video signal and thus there is no extra requirement in terms of a computer's processing ability. This solution, however, has disadvantages that a video compression card must be added and device configuration is complicated, which leads to inconvenience in a user's manipulation. Moreover, in the hardware solution, a signal has to undergo digital-to-analog conversion twice and thus suffers from certain accuracy decline and great distortion, and therefore the user can not be provided with a high-quality picture.
The following is a brief introduction to the technique for acquiring screen content in a real-time manner by means of software. In the operation system Windows, an application fulfills graphic drawing through GDI (Graphics Device Interface) which supports graphic primitive operation and dot matrix interface. A primitive-level interface is relatively advanced and requires a small amount of description data, while it cannot be displayed directly and needs to be converted into dot matrix for output by cooperation of Windows display system and graphic card. A dot matrix-level interface is relatively low and requires a large amount of data, while the data captured by it can be displayed directly. Therefore, in a software solution, the capture of graphic data can be carried out at a dot matrix level, a primitive invoking level or through their combination.
The first software solution is to utilize a user-mode application to acquire FrameBuffer (Frame Buffer), and then post-process the acquired frame image. The second software solution is to utilize a Mirror system for displaying defined by Microsoft company, load a mirror display driver (mirror), duplicate each update for current display screen in a real-time manner, and then compress the mirrored data for recording in stream.
In the first software solution, each time the entire screen is acquired whether there is update or not. In addition, the solution can utilize only a dot matrix interface, and thus it is characterized by large data quantity, slow operation, high bandwidth requirement and suitable for capturing single static screen. In the second software solution, since only the changed part of the screen is acquired, image data is obtained at a faster speed and can be duplicated simultaneously with image displaying (with higher real-time capability), and the second software solution is thus widely applied. Unfortunately, since the source data for video and 3D processing are of a large quantity, require complex local computation and usually undergo accelerated processing by a GPU (Graphics Processing Unit) in a graphic card, the support to video and 3D acceleration in a local computer is automatically prohibited when the Mirror system is defined by Microsoft company, which disables the execution of applications depending on video and 3D acceleration and affects significantly the execution effect of applications employing Mirror.
Accordingly, it is necessary to find a Mirror-like method for rapidly intercepting GDI invocations and supporting video and 3D acceleration simultaneously.